package com.hb.core.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Map;
import java.util.Set;

/**
 * @description:
 * @projectName: zhb-frame-build
 * @author: zhouhaizhi
 * @createTime: 2021/8/27 12:01
 * @version:1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class SecurityClient {

    private String id;

    /*
        客户端id
     */
    private String clientId;

    private String username;

    private String password;

    /*
        角色id集合
     */
    private Set<String> roleIds;

    /*
        token id
     */
    private String jti;

    /*
        失效时间
     */
    private Long exp;

    /*
        授权范围集合
     */
    private Set<String> scope;

    /*
        授权code集合
     */
    private Set<String> authorities;

    /*
        资源服务器id集合
     */
    private Set<String> aud;

    /*
        允许使用的认证模式
     */
    private Set<String> authorizeGrantTypes;

    /*
        回调地址白名单
     */
    private Set<String> redirectUris;

    /*
        ip白名单集合
     */
    private Set<String> ipWhitelist;

    /*
        来源ip
     */
    private String sourceIp;

    /*
        账户过期时间
     */
    private Long expiryTime;

    /*
        账户是否失效（与过期时间无关）
    */
    private Boolean invalid;

    /*
        扩展信息
     */
    private Map<String,Object> extension;

}
